import request from '@/config/axios'
export interface FbpxVO {
  id?: number | string
  pixelId: string
  accessToken: string
  remark?: string
  deptId?: string | number
  createName?: string
}
// fbpx
export const FbpxApi = {
  // 查询facebook像素分页
  getFbpxPage: async (params: any) => {
    return await request.get({ url: `/facebook/pixel/page`, params })
  },

  // 查询facebook像素详情
  getFbpx: async (id: number) => {
    return await request.get({ url: `/facebook/pixel/get?id=` + id })
  },

  // 创建facebook像素
  createFbpx: async (data: FbpxVO) => {
    return await request.post({ url: `/facebook/pixel/create`, data })
  },

  // 修改facebook像素
  updateFbpx: async (data: FbpxVO) => {
    return await request.put({ url: `/facebook/pixel/update`, data })
  },

  // 删除facebook像素
  deleteFbpx: async (id: number) => {
    return await request.delete({ url: `/facebook/pixel/delete?id=` + id })
  }
}
